import React from 'react';
const CommentFilter = ({ setActiveType }) => {
  const handleGoodClick = () => {
    setActiveType('Good');
  };
  const handleMiddleClick = () => {
    setActiveType('Middle');
  };
  const handleBadClick = () => {
    setActiveType('Bad');
  };
  const handleAllClick = () => {
    setActiveType('All');
  };

  return (
    <div>
      <button onClick={handleAllClick}>全部</button>
      <button onClick={handleGoodClick}>好评</button>
      <button onClick={handleMiddleClick}>中评</button>
      <button onClick={handleBadClick}>差评</button>
    </div>
  );
};

export default CommentFilter;
